import { district_getTableData, brand_getTableData, brand_editUpData, brand_addUpData ,brand_deleteRow} from '@/api/shopping'

const actions = {
    /* 商场管理 */
    district_getTableData({ commit }, data) {
        // console.log(data, 'data')
        return new Promise((resolve, reject) => {
            district_getTableData(
                data
            ).then((res) => {
                resolve(res)
            }).catch(error => {
                reject(error)
            })
        })
    },
    /* 品牌制造商 */
    brand_getTableData({ commit }, data) {
        // console.log(data, 'data')
        return new Promise((resolve, reject) => {
            brand_getTableData(
                data
            ).then((res) => {
                resolve(res)
            }).catch(error => {
                reject(error)
            })
        })
    },
    //编辑提交
    brand_editUpData({ commit }, data) {
        // console.log(data, 'data')
        return new Promise((resolve, reject) => {
            brand_editUpData(
                data
            ).then((res) => {
                resolve(res)
            }).catch(error => {
                reject(error)
            })
        })
    },
    //编辑提交
    brand_editUpData({ commit }, data) {
        // console.log(data, 'data')
        return new Promise((resolve, reject) => {
            brand_editUpData(
                data
            ).then((res) => {
                resolve(res)
            }).catch(error => {
                reject(error)
            })
        })
    },
    //添加提交
    brand_addUpData({ commit }, data) {
        // console.log(data, 'data')
        return new Promise((resolve, reject) => {
            brand_addUpData(
                data
            ).then((res) => {
                resolve(res)
            }).catch(error => {
                reject(error)
            })
        })
    },
    //添加提交
    brand_deleteRow({ commit }, data) {
        // console.log(data, 'data')
        return new Promise((resolve, reject) => {
            brand_deleteRow(
                data
            ).then((res) => {
                resolve(res)
            }).catch(error => {
                reject(error)
            })
        })
    },









}

export default {
    namespaced: true,
    actions
}